﻿create proc thuan_qtdanhmucchucvusua
@ID int,
@DienGiai nvarchar(255)
as
if exists(select * from DanhMuc_ChucVu Where MaChucVu<>@ID and ChucVu=@DienGiai)
begin
select ErrCode=0
end
else
begin
update DanhMuc_ChucVu set ChucVu=@DienGiai WHere MaChucVu=@ID
select ErrCode=1
end